Displaying Reports in Web Applications

Description

Reports can be created and displayed in web applications using the "Open a Report, Label or Letter layout" Action Javascript.

Discussion

The Open a Report, Label or Letter layout Action Javascript can be used to generate a report. Depending on the type of report type, you can choose to create a PDF, HTML, or HTML-Paged file.

File Type Options

When you use Action Javascript to display a report, or you add a Report to a Tabbed UI, or you embed a report into a UX component, the output options available are:

  • PDF

  • HTML

  • HTML-Paged

These file type options are explained below. This video also demonstrates differences among the three file type options:

The PDF Option

For Freeform and Layout Table Reports

The PDF option generates a paginated PDF document. The PDF file is displayed in the browser (in a window in the component, a tab pane in the Tabbed UI or in a div on the current page).

The PDF will be displayed differently based on whether or not the browser can render the PDF. Chrome and Firefox have the ability to render PDF files. Internet Explorer, on the other hand, requires Adobe Acrobat PDF viewer, which must be installed separately.

On many mobile devices, there is no option to render PDF files in a browser.

The HTML Option

Layout Reports Only

The HTML option renders the report as HTML. This option is only available for Layout Table reports. The advantage of Layout Table reports over Freeform reports is that they render much more quickly than Freeform reports, and they can be exported to Excel with very high fidelity (because the cells in the Layout Table report can be directly mapped to cells in the Excel spreadsheet).

The HTML produced by this option is not paginated. The report does not render any Page Headers, Page Footers, or page breaks defined in the report. When the HTML is printed, the page breaks are controlled by the printer -- i.e. a new page is started when the current page is full.

The HTML-Paged Option

For Freeform and Layout Table Reports

The HTML-Paged output option can be used for both Freeform and Layout Table reports. Unlike the HTML option, the report is properly paginated and all Page Header, Footers and breaks defined in the report are honored. When the output from the HTML-Paged report is printed, the printout is properly paginated -- just like the output from the PDF option.

Since the output from HTML-Paged option is pure HTML (technically it is HTML with embedded SVG), no special plugins or viewers are needed by the browser. This means that the reports will render in all mobile browsers (unlike the PDF output option).

When you display a report in your web application the uses the HTML-Paged output option, the display window has buttons that allow you to create a PDF version of the report, to print the HTML, to export to Word, or to export to text.

Another benefit of the HTML-Paged output option is the way image with an Alpha channel (images with transparent backgrounds) are rendered. The HTML-Paged option will render these images correctly, while the PDF option may not render these images correctly.

See Also